<h2>Meeting Notes</h2>  
<?php 
    $this->headTitle('Meeting Notes');
    $meeting_id = $this->escape($this->meetingId);
    $acl = $this->acl;    
?>

<?php if  ($acl->isAllowed($this->currentUser, 'access meeting pages')): ?>
<a href="<?php echo $this->url(array(
        'module'        =>  'activity',
        'controller'    =>  'meeting',
        'action'        =>  'viewdetails',
        'meeting_id'    =>  $meeting_id,
    ));?>">Meeting</a>
|
<?php endif; ?>

<?php if  ($acl->isAllowed($this->currentUser, 'create leads')): ?>
<a href="<?php echo $this->url(array(
        'module'        =>  'activity',
        'controller'    =>  'meeting',
        'action'        =>  'createnotes',
        'meeting_id'    =>  $meeting_id,
    ));?>">Create note</a>
<?php endif; ?>

<div class="clearing">
&nbsp;
</div>
<?php
if (count($this->paginator)): ?>
<p>
Total number of notes : <?php echo $this->paginator->getAdapter()->count(); ?>
</p>

<table class="data_table">
<tr>
<th class="short">Notes</th>
<th class="mediumshort">Created</th>
</tr>
<?php foreach ($this->paginator as $item): ?>
<?php
    $itemsArray = $item->toArray();
?>
<tr>
    <?php 
        echo "<td>";
        echo $this->escape($itemsArray['notes']);
        echo "</td>";

        echo "<td>";
        echo $this->escape($this->timestampToHuman($itemsArray['created']));
        echo "</td>";

    ?>
</tr>

<?php endforeach; ?>
<?php endif; ?>

</table>

<?php echo $this->paginationControl($this->paginator, 'Sliding', 'search.phtml'); ?>
